const http = require('http')


const serve = http.createServer((request,response)=>{
    response.setHeader('content-type','text/html;charset=utf-8')
    response.end(JSON.stringify({
        data:{name:'张三',age:20},
        code:200,
    }))
})

serve.listen(9000,()=>{
    console.log('服务启动了')
})
